from peewee import *
import datetime

database = MySQLDatabase('peewee', user='root', host='localhost', port=3306, passwd='Liuxing123!')

class Person(Model):
    name = CharField()
    birthday = DateField()
    is_relative = BooleanField()

    class Meta:
        database = database

# Person.create_table()

# p = Person(name='liuchungui', birthday=datetime.date(1990, 12, 20), is_relative=True)
# p.save()

Person.update()

q = Person.update({Person.birthday: datetime.date(1983, 12, 21)}).where(Person.name == 'liuchungui')
q.execute()